package cn.com.eado.crm.app

import android.app.Application
import androidx.multidex.MultiDexApplication
import com.facebook.stetho.Stetho
import com.tencent.bugly.crashreport.CrashReport

class MyApp : MultiDexApplication() {

    private val isDebug = true

    companion object{
        lateinit var instance: MyApp
    }

    override fun onCreate() {
        super.onCreate()
        instance = this

        if (isDebug) {
//            LeakCanary.install(this);
            Stetho.initializeWithDefaults(this)
            CrashReport.initCrashReport(this, "7ca42822cb", true)  //请自行修改bugly账号id
//            CrashReport.testANRCrash();
        }else {
            CrashReport.initCrashReport(this, "7ca42822cb", false)
        }
        CrashHandler.getInstance().init(this)
    }
}